﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Reports.aspx.cs" Inherits="RPTLoansPartOfCreditLines" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">

    <asp:Panel ID="emptyPanel" runat="server" visible="false">
        <div align="center">
            <h1 > Modulul de Rapoarte </h1>
        </div>
    </asp:Panel>

    <asp:Panel ID="RPTLoansPartOfCreditLinesPanel" runat="server" Visible="false">
        <div class="module">
            <div class="module_content">
                <table width="100%" border="0px">
                    <tr>
                        <td class="infoTableLeft">
                            <asp:Label ID="loanPartOfCreditLineDateFromLabel" runat="server" Text="De la :"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="loanPartOfCreditLineDateFromTextBox" runat="server"></asp:TextBox>          
                            <ajax:CalendarExtender ID="loanPartOfCreditLineDateFromCalendarExtender" runat="server"  TargetControlID="loanPartOfCreditLineDateFromTextBox" />                  
                        </td>
                        <td class="infoTableLeft">
                            <asp:Label ID="Label1" runat="server" Text="Pina la :"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="loanPartOfCreditLineDateToTextBox" runat="server"></asp:TextBox>          
                            <ajax:CalendarExtender ID="loanPartOfCreditLineDateToCalendarExtender" runat="server"  TargetControlID="loanPartOfCreditLineDateToTextBox" />                  
                        </td>
                        <td class="infoTableLeft">
                            <asp:Label ID="Label2" runat="server" Text="Linia de creditare :"></asp:Label>
                        </td>
                        <td>
                            <asp:DropDownList ID="loanPartOfCreditLineCreditLineDLL" runat="server"> </asp:DropDownList>                                            
                        </td>
                        <td>
                            <asp:Button ID="loanPartOfCreditLineRefreshButton" runat="server" Text="AFISEAZA" Width="120px" onclick="loanPartOfCreditLineRefreshButton_Click" />
                        </td>
                        <td>
                             <asp:Button ID="loanPartOfCreditLinePrintButton" runat="server" Text="PRINT" Width="120px" onclientclick="javascript:CallPrint('divlansPartOfCreditLines');"/>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div id="divlansPartOfCreditLines" class="centerBox" style="width:90%">
            <asp:GridView ID="lansPartOfCreditLinesGridView" runat="server" 
                EnableModelValidation="True" 
                AutoGenerateColumns="False" 
                CssClass="mGrid"
                AllowPaging="False">
                <AlternatingRowStyle CssClass="alt" />
                <Columns>
                    <asp:BoundField DataField="Nume" HeaderText="Nume" />
                    <asp:BoundField DataField="Gen" HeaderText="Gen" />
                    <asp:BoundField DataField="Data Nasterii" HeaderText="Data Nasterii"  DataFormatString="{0:d}" />
                    <asp:BoundField DataField="Cod Personal" HeaderText="Cod Personal"  />
                    <asp:BoundField DataField="Raion" HeaderText="Raion"  />
                    <asp:BoundField DataField="Localitatea" HeaderText="Localitatea"  />
                    <asp:BoundField DataField="Adresa" HeaderText="Adresa" />
                    <asp:BoundField DataField="Urban/Rural" HeaderText="Urban/Rural"  />
                    <asp:BoundField DataField="Nivel Educatie" HeaderText="Nivel Educatie"  />
                    <asp:BoundField DataField="Tip Afacere" HeaderText="Tip Afacere"  />
                    <asp:BoundField DataField="Sector Afacere" HeaderText="Sector Afacere"  />
                    <asp:BoundField DataField="Descriere Afacere" HeaderText="Descriere Afacere"  />
                    <asp:BoundField DataField="Data inceperii Afacere" HeaderText="Data inceperii Afacere"  DataFormatString="{0:d}" />
                    <asp:BoundField DataField="Ani exp. in domeniu" HeaderText="Ani exp. in domeniu"  />
                    <asp:BoundField DataField="Ani exp. in afaceri" HeaderText="Ani exp. in afaceri"  />
                    <asp:BoundField DataField="Suma creditului" HeaderText="Suma creditului"  />
                    <asp:BoundField DataField="Perioada de mprumut" HeaderText="Perioada de mprumut" />
                    <asp:BoundField DataField="Dobinda" HeaderText="Dobinda"  />
                    <asp:BoundField DataField="Data aplicariii" HeaderText="Data aplicariii"  DataFormatString="{0:d}" />
                    <asp:BoundField DataField="Total rambursat" HeaderText="Total rambursat"  />
                    <asp:BoundField DataField="Total ramas de rambursat" HeaderText="Total ramas de rambursat"  />                
                </Columns>                
                <PagerStyle CssClass="pgr" />
                <SelectedRowStyle BackColor="#CCCCFF" />
            </asp:GridView>
        </div>  
    </asp:Panel>

    <asp:Panel ID="ListOfPaymentsInSelectedPeriodPanel" runat="server" Visible="false">
        <div class="module">
            <div class="module_content">
                <table width="100%" border="0px">
                    <tr>
                        <td class="infoTableLeft">
                            <asp:Label ID="listOfPaymentInSelPerDateFromLabel" runat="server" Text="De la :"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="listOfPaymentInSelPerDateFromTextBox" runat="server"></asp:TextBox>          
                            <ajax:CalendarExtender ID="listOfPaymentInSelPerDateFromCalendarExtender" runat="server"  TargetControlID="listOfPaymentInSelPerDateFromTextBox" />                  
                        </td>
                        <td class="infoTableLeft">
                            <asp:Label ID="Label3" runat="server" Text="Pina la :"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="listOfPaymentInSelPerDateToTextBox" runat="server"></asp:TextBox>          
                            <ajax:CalendarExtender ID="listOfPaymentInSelPerDateToCalendarExtender" runat="server"  TargetControlID="listOfPaymentInSelPerDateToTextBox" />                  
                        </td>       

                        <td class="infoTableLeft" style="width:400px;">
                            <asp:CheckBox ID="listOfPaymentInSelPerFilterByFoundLineCheckBox" Checked="true" runat="server" Text="Linia de creditare :" TextAlign="Left" AutoPostBack="true" oncheckedchanged="listOfPaymentInSelPerFilterByFoundLineCheckBox_CheckedChanged" />
                        </td>
                        <td>
                            <asp:DropDownList ID="listOfPaymentInSelPerFoundingLineDDL" runat="server">
                            </asp:DropDownList>                                        
                        </td>    
                        
                        <td class="infoTableLeft">
                            <asp:CheckBox ID="listOfPaymentInSelEnableProgramFilterCheckBox" runat="server" Text="Programul :" Checked="true" TextAlign="Left" AutoPostBack="true" oncheckedchanged="listOfPaymentInSelEnableProgramFilterCheckBox_CheckedChanged" />
                        </td>
                        <td>
                            <asp:DropDownList ID="listOfPaymentInSelPerProgramDDL" runat="server"  Width="150px"> </asp:DropDownList>      
                        </td>  
                         
                        <td class="infoTableLeft">
                             <asp:CheckBox ID="listOfPaymentInSelEnableLoanStateFilterCheckBox" runat="server" Text="Starea :" Checked="true" TextAlign="Left" AutoPostBack="true" oncheckedchanged="listOfPaymentInSelEnableLoanStateFilterCheckBox_CheckedChanged" />
                        </td>
                        <td>
                            <asp:DropDownList ID="listOfPaymentInSelPerLoanStateDDL" runat="server"  Width="150px" Enabled="true"> </asp:DropDownList> 
                        </td>

                                          
                        <td>
                            <asp:Button ID="listOfPaymentInSelPerRefreshButton" runat="server" Text="AFISEAZA" Width="120px" onclick="listOfPaymentInSelPerRefreshButton_Click" />
                        </td>
                        <td>
                             <asp:Button ID="listOfPaymentInSelPerPrintButton" runat="server" Text="PRINT" Width="120px" onclientclick="javascript:CallPrint('divListOfPaymentInSelPer');"/>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div id="divListOfPaymentInSelPer" class="centerBox" style="width:90%">
            <h2 style="text-align:center">RAMBURSARI PLANIFICATE</h2>
            <asp:GridView ID="listOfPaymentInSelPerGridView" runat="server"                  
                EnableModelValidation="True" 
                AutoGenerateColumns="False" 
                CssClass="mGrid"
                AllowPaging="False" 
                ShowFooter="True"
                onrowdatabound="listOfPaymentInSelPerGridView_RowDataBound">
                <AlternatingRowStyle CssClass="alt" />
                
                <Columns>    
                    <asp:TemplateField HeaderText="Nr. Contract">
                        <ItemTemplate>
                            <asp:Label ID="listPaymentsinSelPerNrContractLabel" runat="server" Text='<%# Bind("contractCode") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>

                    <asp:TemplateField HeaderText="Data">
                        <ItemTemplate>
                            <asp:Label ID="listPaymentsinSelPerDataLabel" runat="server" Text='<%# ((Eval("calculatedData") != null && Eval("calculatedData") is DateTime) ?  ((DateTime)Eval("calculatedData")).ToString(Constants.Constants.ISODateBackwardDotsFormat) : "") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>

                    <asp:TemplateField HeaderText="Client Description">
                        <ItemTemplate>
                            <asp:Label ID="clientDescriptionLabel" runat="server" Text='<%# Bind("ClientDescription") %>'></asp:Label>
                        </ItemTemplate>
                        <FooterTemplate>
                            <asp:Label ID="totalLabel" runat="server" Text="Totaluri:" CssClass="tableFooter"></asp:Label>
                        </FooterTemplate>
                    </asp:TemplateField>      
                                                                
                    <asp:TemplateField  HeaderText="Dobinda" >
                        <ItemTemplate>                        
                            <asp:Label ID="percentValueLabel" runat="server" Text='<%# Bind("percentValue") %>'></asp:Label> 
                        </ItemTemplate>         
                        <FooterTemplate>
                            <asp:Label ID="totalPercentValueLabel" runat="server" Text="" CssClass="tableFooter"></asp:Label>
                        </FooterTemplate>               
                    </asp:TemplateField>

                    <asp:TemplateField  HeaderText="Corp Credit" >
                        <ItemTemplate>                        
                            <asp:Label ID="mainRateLabel" runat="server" Text='<%# Bind("mainRate") %>'></asp:Label> 
                        </ItemTemplate>  
                        <FooterTemplate>
                            <asp:Label ID="totalMainRateLabel" runat="server" Text="" CssClass="tableFooter"></asp:Label>
                        </FooterTemplate>                       
                    </asp:TemplateField>

                    <asp:TemplateField  HeaderText="Suma Totala" >
                        <ItemTemplate>                        
                            <asp:Label ID="totalAmountLabel" runat="server" Text='<%# Bind("TotalAmount") %>'></asp:Label> 
                        </ItemTemplate>
                        <FooterTemplate>
                            <asp:Label ID="totalTotalAmountLabelLabel" runat="server" Text="" CssClass="tableFooter"></asp:Label>
                        </FooterTemplate>    
                    </asp:TemplateField>

                </Columns>
                <PagerStyle CssClass="pgr" />
                <SelectedRowStyle BackColor="#CCCCFF" />
            </asp:GridView>
        </div>  
    </asp:Panel>


    <asp:Panel ID="imprumuturiAcordatePanel" runat="server" Visible="false">
        <div class="module">
            <div class="module_content">
                <table width="100%" border="0px">
                    <tr>
                        <td class="infoTableLeft">
                            <asp:Label ID="Label11" runat="server" Text="De la :"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="grantedLoansFromTextBox" runat="server"></asp:TextBox>          
                            <ajax:CalendarExtender ID="grantedLoansFromCalendarExtender" runat="server"  TargetControlID="grantedLoansFromTextBox" />                  
                        </td>
                        <td class="infoTableLeft">
                            <asp:Label ID="Label12" runat="server" Text="Pina la :"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="grantedLoansToTextBox" runat="server"></asp:TextBox>          
                            <ajax:CalendarExtender ID="grantedLoansToCalendarExtender" runat="server"  TargetControlID="grantedLoansToTextBox" />                  
                        </td>       

                        <td class="infoTableLeft" style="width:400px;">
                            <asp:CheckBox ID="grantedLoansFilterByCreditLineCheckBox" Checked="false" runat="server" Text="Linia de creditare :" TextAlign="Left" AutoPostBack="true" oncheckedchanged="grantedLoansFilterByCreditLineCheckBox_CheckedChanged" />
                        </td>
                        <td>
                            <asp:DropDownList ID="grantedLoansCreditLineDDL" runat="server">
                            </asp:DropDownList>                                        
                        </td>    
                        
                        <td class="infoTableLeft">
                            <asp:CheckBox ID="grantedLoansFilterByProgramCheckBox" runat="server" Text="Programul :" Checked="false" TextAlign="Left" AutoPostBack="true" oncheckedchanged="grantedLoansFilterByProgramCheckBox_CheckedChanged" />
                        </td>
                        <td>
                            <asp:DropDownList ID="grantedLoansProgramDDL" runat="server"  Width="150px"> </asp:DropDownList>      
                        </td>  
                         


                      <%--  <td style="width:300px; padding-left:20px;">
                            <asp:RadioButton ID="grantedLoansOnlyInLeiRadioButton" runat="server" GroupName="grantedLoansCurrencyGroup" Text="Numai in LEI" Checked="true" />
                            <br />
                            <asp:RadioButton ID="grantedLoansOnlyInValutaRadioButton" runat="server" GroupName="grantedLoansCurrencyGroup" Text="Numai in Valuta Straina" />
                        </td>        --%>
                                       
                        <td>
                            <asp:Button ID="grantedLoansRefreshButton" runat="server" Text="AFISEAZA" Width="120px" onclick="grantedLoansRefreshButton_Click" />
                        </td>
                        <td>
                             <asp:Button ID="grantedLoansPrintButton" runat="server" Text="PRINT" Width="120px" onclientclick="javascript:CallPrint('grantedLoansDiv');"/>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div id="grantedLoansDiv" class="centerBox" style="width:90%">
            <h2 style="text-align:center">CREDITE ACORDATE</h2>
            <asp:GridView ID="grantedLoansGridView" runat="server"                  
                EnableModelValidation="True" 
                AutoGenerateColumns="False" 
                CssClass="mGrid"
                AllowPaging="False" 
                ShowFooter="True"
                onrowdatabound="grantedLoansGridView_RowDataBound">
                <AlternatingRowStyle CssClass="alt" />
                
                <Columns>    
                    <asp:TemplateField HeaderText="Nr. Contract">
                        <ItemTemplate>
                            <asp:Label ID="listPaymentsinSelPerNrContractLabel" runat="server" Text='<%# Bind("contractCode") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>

                    <asp:TemplateField HeaderText="Data">
                        <ItemTemplate>
                            <asp:Label ID="listPaymentsinSelPerDataLabel" runat="server" Text='<%# ((Eval("loanStartDate") != null && Eval("loanStartDate") is DateTime) ?  ((DateTime)Eval("loanStartDate")).ToString(Constants.Constants.ISODateBackwardDotsFormat) : "") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>

                    <asp:TemplateField HeaderText="Client Description">
                        <ItemTemplate>
                            <asp:Label ID="clientDescriptionLabel" runat="server" Text='<%# Bind("ClientDescription") %>'></asp:Label>
                        </ItemTemplate>
                        <FooterTemplate>
                            <asp:Label ID="totalLabel" runat="server" Text="Totaluri:" CssClass="tableFooter"></asp:Label>
                        </FooterTemplate>
                    </asp:TemplateField>      
                                                                
                    <asp:TemplateField  HeaderText="Procentul" >
                        <ItemTemplate>                        
                            <asp:Label ID="percentValueLabel" runat="server" Text='<%# Bind("percentValue") %>'></asp:Label> 
                        </ItemTemplate>         
                    </asp:TemplateField>

                    <asp:TemplateField  HeaderText="Suma imprumutului" >
                        <ItemTemplate>                        
                            <asp:Label ID="creditAmountLabel" runat="server" Text='<%# Bind("creditAmountValue") %>'></asp:Label> 
                        </ItemTemplate>  
                        <FooterTemplate>
                            <asp:Label ID="totalCreditAmountLabel" runat="server" Text="" CssClass="tableFooter"></asp:Label>
                        </FooterTemplate>                       
                    </asp:TemplateField>                  

<%--                    <asp:TemplateField  HeaderText="Suma imprumutului in MDL" >
                        <ItemTemplate>                        
                            <asp:Label ID="creditAmount_RatedLabel" runat="server" Text='<%# Bind("creditAmount_Rated") %>'></asp:Label> 
                        </ItemTemplate>
                        <FooterTemplate>
                            <asp:Label ID="totalcreditAmount_RatedLabel" runat="server" Text="" CssClass="tableFooter"></asp:Label>
                        </FooterTemplate>
                    </asp:TemplateField>    --%>               

                </Columns>
                <PagerStyle CssClass="pgr" />
                <SelectedRowStyle BackColor="#CCCCFF" />
            </asp:GridView>
        </div>  
    </asp:Panel>


    <asp:Panel ID="personalDataReportPanel" runat="server" Visible="false">
        <div class="module">
            <div class="module_content">
                <table width="100%" border="0px">
                    <tr>
<%--                        <td class="infoTableLeft">
                            <asp:Label ID="Label4" runat="server" Text="Tara :"></asp:Label>
                        </td>
                        <td>      
                            <asp:DropDownList ID="personalDataReport_CountryDDL" runat="server"  Width="100px" Enabled="false"> </asp:DropDownList>               
                        </td>--%>
                        <td class="infoTableLeft">
                            <asp:Label ID="Label5" runat="server" Text="Raion :"></asp:Label>
                        </td>
                        <td>
                            <asp:DropDownList ID="personalDataReport_RaionDDL" runat="server"  Width="100px"> </asp:DropDownList>               
                        </td>       
                        
                        <td class="infoTableLeft">
                            <asp:Label ID="Label6" runat="server" Text="Urban/Rural :"></asp:Label>
                        </td>
                        <td>
                            <asp:DropDownList ID="personalDataReport_UrbanRuralDDL" runat="server"  Width="100px">
                                <asp:ListItem Text="**"  Value=""/>
                                <asp:ListItem Text="Rural"  Value="Rural"/>
                                <asp:ListItem Text="Urban"  Value="Urban"/>
                            </asp:DropDownList>               
                        </td>  

                        <td class="infoTableLeft">
                            <asp:Label ID="Label7" runat="server" Text="Gen :"></asp:Label>
                        </td>
                        <td>
                            <asp:DropDownList ID="personalDataReport_GenderDDL" runat="server"  Width="70px"> </asp:DropDownList>               
                        </td>  
                                                
                        <td class="infoTableLeft">
                            <asp:Label ID="Label8" runat="server" Text="Biserica :"></asp:Label>
                        </td>
                        <td>
                            <asp:DropDownList ID="personalDataReport_CiorchDDL" runat="server"  Width="100px"> </asp:DropDownList>               
                        </td>  

                                                 
                        <td class="infoTableLeft">
                            <asp:Label ID="Label9" runat="server" Text="Domeniu Economic :"></asp:Label>
                        </td>
                        <td>
                            <asp:DropDownList ID="personalDataReport_SectorAfacereDDL" runat="server"  Width="100px"> </asp:DropDownList>               
                        </td>   
                                   
                        <td class="infoTableLeft">
                            <asp:Label ID="Label4" runat="server" Text="Program :"></asp:Label>
                        </td>
                        <td>
                            <asp:DropDownList ID="personalDataReport_ProgramDDL" runat="server"  Width="70px"> </asp:DropDownList>               
                        </td>     

                        <td class="infoTableLeft">
                            <asp:Label ID="Label10" runat="server" Text="Linia de Credit :"></asp:Label>
                        </td>
                        <td>
                            <asp:DropDownList ID="crediLineDDL" runat="server"  Width="70px"> </asp:DropDownList>               
                        </td>    

                        <td>
                            <asp:Button ID="personalDataRepor_RefreshButton" runat="server" Text="AFISEAZA" Width="100px" onclick="personalDataRepor_RefreshButton_Click" />
                        </td>
                        <td>
                             <asp:Button ID="personalDataReport_PrintButton" runat="server" Text="PRINT" Width="100px" onclientclick="javascript:CallPrint('divPersonalDataReport');"/>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div id="divPersonalDataReport" class="centerBox" style="width:90%">
            <h2 style="text-align:center">DATE GENERALE BENEFICIARI</h2>
            <asp:GridView ID="personalDataReportGridView" runat="server"                  
                EnableModelValidation="True" 
                AutoGenerateColumns="False" 
                CssClass="mGrid"
                AllowPaging="False" 
                ShowFooter="True">
                <AlternatingRowStyle CssClass="alt" />                
                <Columns>    
                    <asp:BoundField DataField="nr"  HeaderText="Nr."  HtmlEncode="False" />
                    <asp:BoundField DataField="ClientDescription"  HeaderText="Nume Preume"  HtmlEncode="False" />
                    <asp:BoundField DataField="raddress_raion"  HeaderText="Raion"  HtmlEncode="False" />
                    <asp:BoundField DataField="raddress_localitatea"  HeaderText="Localitatea"  HtmlEncode="False" />
                    <asp:BoundField DataField="raddress_stradaAdresa"  HeaderText="Adresa"  HtmlEncode="False" />
                    <asp:BoundField DataField="telefonFix"  HeaderText="Telefon Fix"  HtmlEncode="False" />
                    <asp:BoundField DataField="telefonMobil"  HeaderText="Telefon Mob"  HtmlEncode="False" />
                    <asp:BoundField DataField="church_string"  HeaderText="Biserica"  HtmlEncode="False" />
                    <asp:BoundField DataField="Sector Afacere"  HeaderText="Domeniul Economic"  HtmlEncode="False" />
                    <asp:BoundField DataField="Tip Afacere"  HeaderText="Tip Afacere"  HtmlEncode="False" />
                </Columns>
                <PagerStyle CssClass="pgr" />
                <SelectedRowStyle BackColor="#CCCCFF" />
            </asp:GridView>
        </div>  
    </asp:Panel>

   
    <asp:Panel ID="consultEvalReportPanel" runat="server" Visible="false">
        <div class="module">
            <div class="module_content">
                <table width="100%" border="0px">
                    <tr>
                        <td class="infoTableLeft">
                            <asp:Label ID="Label13" runat="server" Text="De la :"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="conEvalDateFromTextBox" runat="server"></asp:TextBox>          
                            <ajax:CalendarExtender ID="conEvalDateFromCalendarExtender" runat="server"  TargetControlID="conEvalDateFromTextBox" />                  
                        </td>
                        <td class="infoTableLeft">
                            <asp:Label ID="Label14" runat="server" Text="Pina la :"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="conEvalDateToTextBox" runat="server"></asp:TextBox>          
                            <ajax:CalendarExtender ID="conEvalDateToCalendarExtender" runat="server"  TargetControlID="conEvalDateToTextBox" />                  
                        </td>       

                        <td>
                            <asp:Button ID="conEvalRefreshButton" runat="server" Text="AFISEAZA" Width="120px" onclick="conEvalRefreshButton_Click" />
                        </td>
                        <td>
                             <asp:Button ID="conEvalPrintButton" runat="server" Text="PRINT" Width="120px" onclientclick="javascript:CallPrint('conEvalRepDiv');"/>
                        </td>
                    </tr>
                    <tr>
                        <td class="infoTableLeft" style="width:400px;">
                            <asp:CheckBox ID="conEvalOperatorCheckBox" Checked="false" runat="server" Text="Operator :" TextAlign="Left" AutoPostBack="true" oncheckedchanged="conEvalOperatorCheckBox_CheckedChanged" />
                        </td>
                        <td>
                            <asp:DropDownList ID="conEvalOperatorDDL" runat="server" Enabled="false">
                            </asp:DropDownList>                                        
                        </td>   

                        <td class="infoTableLeft" style="width:400px;">
                            <asp:CheckBox ID="conEvalCreditLineCheckBox" Checked="false" runat="server" Text="Linia de creditare :" TextAlign="Left" AutoPostBack="true" oncheckedchanged="conEvalCreditLineCheckBox_CheckedChanged" />
                        </td>
                        <td>
                            <asp:DropDownList ID="conEvalCreditLineDDL" runat="server" Enabled="false">
                            </asp:DropDownList>                                        
                        </td>    
                        
                        <td class="infoTableLeft">
                            <asp:CheckBox ID="conEvalProgramCheckBox" runat="server" Text="Programul :" Checked="false" TextAlign="Left" AutoPostBack="true" oncheckedchanged="conEvalProgramCheckBox_CheckedChanged" />
                        </td>
                        <td>
                            <asp:DropDownList ID="conEvalProgramDDL" runat="server"  Width="150px" Enabled="false"> </asp:DropDownList>      
                        </td>  
                         
                        <td class="infoTableLeft">
                            <asp:CheckBox ID="conEvalTipConsultCheckBox" runat="server" Text="Tip :" Checked="false" TextAlign="Left" AutoPostBack="true" oncheckedchanged="conEvalTipCheckBox_CheckedChanged" />
                        </td>
                        <td>
                            <asp:DropDownList ID="conEvalTipConsultDDL" runat="server"  Width="150px" Enabled="false"> </asp:DropDownList>      
                        </td>       
                                       
                        <td class="infoTableLeft">
                            <asp:CheckBox ID="conEvalStateCheckBox" runat="server" Text="Starea :" Checked="false" TextAlign="Left" AutoPostBack="true" oncheckedchanged="conEvalStateCheckBox_CheckedChanged" />
                        </td>
                        <td>
                            <asp:DropDownList ID="conEvalStateDDL" runat="server"  Width="150px" Enabled="false"> </asp:DropDownList>      
                        </td>   

                    </tr>
                </table>
            </div>
        </div>
        <div id="conEvalRepDiv" class="centerBox" style="width:90%">
            <h2 style="text-align:center">CONSULTARI / EVALUARI</h2>
            <asp:GridView ID="conEvalGridView" runat="server"                  
                EnableModelValidation="True" 
                AutoGenerateColumns="False" 
                CssClass="mGrid"
                AllowPaging="False" >
                <AlternatingRowStyle CssClass="alt" />
                
                <Columns>    
                    <asp:TemplateField HeaderText="Data Consultarii">
                        <ItemTemplate>
                            <asp:Label ID="consultDataLabel" runat="server" Text='<%# ((Eval("ConsultEvalDate") != null && Eval("ConsultEvalDate") is DateTime) ?  ((DateTime)Eval("ConsultEvalDate")).ToString(Constants.Constants.ISODateBackwardDotsFormat) : "") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="ClientDescription" HeaderText="Client Description" HtmlEncode="False" />
                    <asp:BoundField DataField="sector_afacere_string" HeaderText="Dom. Economic" HtmlEncode="False" />
                    <asp:BoundField DataField="tipafacere" HeaderText="Tip Afacere" HtmlEncode="False" />                                                                
                    <asp:TemplateField HeaderText="Buss. Start Date">
                        <ItemTemplate>
                            <asp:Label ID="startDateDataLabel" runat="server" Text='<%# ((Eval("bussinessStartDate") != null && Eval("bussinessStartDate") is DateTime) ?  ((DateTime)Eval("bussinessStartDate")).ToString(Constants.Constants.ISODateBackwardDotsFormat) : "") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="BusinessState_string" HeaderText="Starea afacerii" HtmlEncode="False" />                
                    <asp:BoundField DataField="nrAngajati" HeaderText="Nr. Angajati" HtmlEncode="False" />   
                    <asp:BoundField DataField="venit_lunar_afacere" HeaderText="Venit mediu lunar" HtmlEncode="False" />                       
                    <asp:BoundField DataField="ShortDescription" HeaderText="Scurta descriere" HtmlEncode="False" />       
                    <asp:BoundField DataField="nrOfVizits" HeaderText="Numar de vizite efectuate in perioada selectata" HtmlEncode="False" />                                           
                </Columns>
                <PagerStyle CssClass="pgr" />
                <SelectedRowStyle BackColor="#CCCCFF" />
            </asp:GridView>
        </div>  
    </asp:Panel>
    

    <asp:Panel ID="parReportPanel" runat="server" Visible="false">
        <div class="module">
            <div class="module_content">
                <table width="100%" border="0px">
                    <tr>
                        <td class="infoTableLeft">
                            <asp:Label ID="Label15" runat="server" Text="La data :"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="parReportDateTextBox" runat="server"></asp:TextBox>          
                            <ajax:CalendarExtender ID="parReportDateCalendarExtender" runat="server"  TargetControlID="parReportDateTextBox" />                  
                        </td>
                        <td class="infoTableLeft">
                            <asp:Label ID="Label16" runat="server" Text="Manager creditare :"></asp:Label>
                        </td>
                        <td>
                            <asp:DropDownList ID="managerCredtDDL" runat="server">
                            </asp:DropDownList>                                        
                        </td>    
                        
                        <td class="infoTableLeft">
                            <asp:Label ID="Label17" runat="server" Text="Suma minimala :"></asp:Label>
                        </td>
                        <td>    
                            <asp:TextBox ID="parReportMinAmountTextBox" runat="server" Text="10"></asp:TextBox>  
                        </td>         
                        <td>
                            <asp:Button ID="parReportRefreshButton" runat="server" Text="AFISEAZA" Width="120px" onclick="parReportRefreshButton_Click" />
                        </td>
                        <td>
                             <asp:Button ID="Button2" runat="server" Text="PRINT" Width="120px" onclientclick="javascript:CallPrint('ParReportDIV');"/>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div id="ParReportDIV" class="centerBox" style="width:90%">
            <h2 style="text-align:center">Raportul "PAR"</h2>
            <br />
            
            <asp:GridView ID="parReportGridView" runat="server"                  
                EnableModelValidation="True" 
                AutoGenerateColumns="False" 
                CssClass="mGrid"
                OnRowDataBound="parReportGridView_RowDataBound"
                AllowPaging="False" 
                ShowFooter="True">
                <AlternatingRowStyle CssClass="alt" />
                
                <Columns>    
                    <asp:TemplateField >
                        <HeaderTemplate>
                            <asp:Label ID="managerTitleLabel" runat="server" Text="Managerul"> </asp:Label> <br /><br />
                            <asp:Label ID="managerLabel" runat="server"> </asp:Label>
                        </HeaderTemplate>    
                        <ItemTemplate>
                            <asp:Label ID="minAmountLabel" runat="server" Text='<%# Bind("minAmount") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>

                    <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:Label ID="nrContractTitleLabel" runat="server" Text="Nr. Contract"> </asp:Label> <br />
                            <asp:Label ID="nrTotalContracteLabel" runat="server"> </asp:Label> <br />
                            <asp:Label ID="nrContracteInRaportLabel" runat="server"> </asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:Label ID="loanNrLabel" runat="server" Text='<%# Bind("contractCode") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>

                    <asp:TemplateField>
                         <HeaderTemplate>
                            <asp:Label ID="beneficiarTitleLabel" runat="server" Text="Beneficiarul"> </asp:Label> <br /><br /><br />
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:Label ID="clientDescriptionLabel" runat="server" Text='<%# Bind("clientDescription") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>

                    <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:Label ID="totalAmountTitleLabel" runat="server" Text="Suma imrumutului"> </asp:Label> <br />
                            <asp:Label ID="totalAmountLabel" runat="server"> </asp:Label> <br /><br />    
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:Label ID="loanAmountLabel" runat="server" Text='<%# Bind("creditAmountValue") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>                

                    <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:Label ID="totalRemainingAmountTitleLabel" runat="server" Text="Suma ramasa"> </asp:Label> <br />
                            <asp:Label ID="totalRemainingAmountLabel" runat="server"> </asp:Label> <br /><br />    
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lremainingAmountLabel" runat="server" Text='<%# Bind("RemainingAmount") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>   

                    <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:Label ID="parProcentTitleLabel" runat="server" Text="Prima Data intirziata"> </asp:Label> <br />
                            <asp:Label ID="parProcentLabel" runat="server"> </asp:Label> <br />
                            <asp:Label ID="parCoefivientLabel" runat="server"> </asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:Label ID="firstDlayeDateLabel" runat="server" Text='<%# ((Eval("FirstDelayDay") != null && Eval("FirstDelayDay") is DateTime) ?  ((DateTime)Eval("FirstDelayDay")).ToString(Constants.Constants.ISODateBackwardDotsFormat) : "") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>

                    <asp:TemplateField>
                         <HeaderTemplate>
                            <asp:Label ID="intirzieri0TitleLabel" runat="server" Text="Intirzieri (0)"> </asp:Label> <br />
                            <asp:Label ID="intirzieri0TotalLabel" runat="server"> </asp:Label> <br />
                            <asp:Label ID="intirzieri0CurrentLabel" runat="server"> </asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:Label ID="delay0Label" runat="server" Text='<%# Bind("delay0") %>'></asp:Label>
                        </ItemTemplate>                        
                    </asp:TemplateField>      
                                                                
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:Label ID="intirzieri30TitleLabel" runat="server" Text="Intirzieri (30)"> </asp:Label> <br />
                            <asp:Label ID="intirzieri30TotalLabel" runat="server"> </asp:Label> <br />
                            <asp:Label ID="intirzieri30CurrentLabel" runat="server"> </asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>                        
                            <asp:Label ID="delay30Label" runat="server" Text='<%# Bind("delay30") %>'></asp:Label> 
                        </ItemTemplate>         
                    </asp:TemplateField>

                    <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:Label ID="intirzieri90TitleLabel" runat="server" Text="Intirzieri (90)"> </asp:Label> <br />
                            <asp:Label ID="intirzieri90TotalLabel" runat="server"> </asp:Label> <br />
                            <asp:Label ID="intirzieri90CurrentLabel" runat="server"> </asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>                        
                            <asp:Label ID="delay90Label" runat="server" Text='<%# Bind("delay90") %>'></asp:Label> 
                        </ItemTemplate>                                          
                    </asp:TemplateField>                  

                    <asp:TemplateField>
                        <HeaderTemplate>
                            <asp:Label ID="intirzieri180TitleLabel" runat="server" Text="Intirzieri (180)"> </asp:Label> <br />
                            <asp:Label ID="intirzieri180TotalLabel" runat="server"> </asp:Label> <br />
                            <asp:Label ID="intirzieri180CurrentLabel" runat="server"> </asp:Label>
                        </HeaderTemplate>
                        <ItemTemplate>                        
                            <asp:Label ID="delay180Label" runat="server" Text='<%# Bind("delay180") %>'></asp:Label> 
                        </ItemTemplate>
                    </asp:TemplateField>    
                </Columns>
                <PagerStyle CssClass="pgr" />
                <SelectedRowStyle BackColor="#CCCCFF" />
            </asp:GridView>
        </div>  
    </asp:Panel>




</asp:Content>

